Unifying TaskSet and Task under a single identifier #185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is informed by a problem brought up in: #174
We currently export
TaskSetandTasktypes, which are really internal types. What we want is for users to deal with a genericTasktype that encompasses the union of those interfaces. We already have that, inTaskBase, but the nameTaskBasesuggests that users should look for something more specific, so it might be a good idea to change it.So this PR renames
TasktoSingleTask, and hides it from JSDoc, meaning that it won't be exported for use in IntelliSense. We also hidTaskSetin a previous PR.This PR then renames
TaskBasetoTaskand keeps it for IntelliSense use.This is obviously a breaking change, but we are only recently paying close attention to the IntelliSense usage so this slipped under our radar. I'm happy to discuss alternatives or workarounds, this is just here to open a discussion, unless folks feel comfortable merging.
An outstanding "problem" is that TaskSet and SingleTask are still exported in src/classes.ts so I believe users still have access to it even if we hide them in JSDocs. We should consider doing a sweep over those exports and removing unwanted declarations.
Thanks!